package com.example.fristdemo;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        EdgeToEdge.enable(this);
        setContentView(R.layout.activity_main);
        TextView viewById = findViewById(R.id.testView);
        viewById.setText("你好，安卓！");

         Button button =findViewById(R.id.jumpButoon);
         button.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View view) {
                 // 新建一个Intend
                 Intent intent = new Intent();
                 intent.setClass(MainActivity.this,MainActivity2.class);
                 startActivity(intent);
             }
         });
         
    }
}